Voicebot Conversation

The icon for the Voicebot Conversation action.

Integrates a self-service virtual agentClosed A software application that handles customer interactions in place of a live human agent. with voice scripts. Your virtual agent must support this action.

This action is only for use with very simple bots. It does not allow for customization of the bot's behavior from turn to turn. If you require custom exchange parameters or want to customize aspects of the exchange and if your virtual agent supports it, use the Voicebot Exchange action.

Voicebot Conversation interacts directly with the bot, passively monitoring the conversation in real time. The bot analyzes the conversation for intentClosed What the contact wants to communicate or accomplish and context from a constant audio stream and returns appropriate responses to the contact. When the conversation is over, the action continues the Studio script. The action passes along any relevant information for screenpops, agent routing, and so on.

Double-clicking this action opens the CXone Virtual Agent Hub, where you can manage all of your virtual agent bots.

Supported Script Types

The icon for the Phone script type - an old-style phone handset with curved lines indicating sound coming out of it.
Phone

Related Studio Actions

The Voicebot Exchange action is similar to this action but is used for more complex virtual agent interactions. It allows you to include exchange parameters and to customize various aspects of the conversation between contact and bot.

Textbot Conversation and Textbot Exchange are also similar, providing the same functions as Voicebot Conversation and Voicebot Exchange, but for text-based interactions.

Supported Virtual Agents

This action supports the following virtual agents: 

Before you can assign a virtual agent bot to this action, you must add and configure the bot in the CXone Virtual Agent Hub. You only need to add a virtual agent to the Virtual Agent Hub once, then you can assign it to actions as needed. Refer to the topic for the virtual agent you're using for configuration details.

Properties

Property Details
virtualAgentID

Corresponds to the name of the virtual agent selected in the CXone Virtual Agent Hub. See the Supported Virtual Agents section on this page for more information.

customPayload

A generic JSON object that passes data from the script to the bot. It's populated from the Studio script. You can use it to pass information such as the contact's name from the CRM to be used in the Welcome message. You can convert this object using the asjson() method in a Snippet action.

For Amazon Lex bots, this property is required. Use a Snippet action with code from the customPayload snippet. Other bots may benefit from this property and the customPayload snippet.

For Google Dialogflow ES bots, this property is used to pass the context for an intentClosed What the contact wants to communicate or accomplish. For more information about using this property with Google Dialogflow ES, see the Best Practices for Custom Payload with Google Dialogflow ES section in this topic.

For Google Dialogflow CX bots, see the Best Practices for Custom Payload with Google Dialogflow CX section.

Don't use this property if you need to process data that the bot returns to the script. Instead, use the customPayloadVarName (out) variable.

maxTimeouts

Sets the number of no-utterance exchanges before routing to the error fallback branch.

maxNotUnderstood

Sets the number of failed intent recognition exchanges before routing to the error fallback branch.

Branches

Branch Details
OnBotSessionComplete

Path taken when the bot indicates that the conversation has ended.

OnError Path taken when there is an unexpected problem (for example, poor connectivity, syntax errors, and so forth). The _ERR variable should be populated with a condensed explanation of the problem.
OnDTMFBreakout

Path taken when a DTMFClosed Signaling tones that are generated when a user presses or taps a key on their telephone keypad. rule in the script was met.

OnUserInputTimeout

Path taken when there is no response by the user in the time specified in the Default Next Prompt Behavior Snippet action. See the script example in this topic or Virtual Agent Hub for more information on the snippets required to set up a bot in Studio.

OnUserInputNotUnderstood

Path taken when the user's intent is not matched by the bot. The Default Fallback Intent property is used for Google Dialogflow ES when the intent is not matched.

Output Variables

Variable Details
customPayloadVarName (out)

Returns custom JSON data from the virtual agent bot to the script. Use this variable when you want the script to process data that the bot provides. May contain fulfillment data.

If you want to provide data to the bot, use the customPayload property.

errorDetailsVarName (out)

Prompts the error intent sequence; can lead to a transfer to a live agent.

intentInfoVarName (out)

Lists details from the bot indicating current user intent.

Snippet Action Code

Some of this action's properties require Snippet action code. You can follow these examples when creating your script.

Best Practices for Custom Payload with Google Dialogflow CX

When using this action with Google Dialogflow CX follow these best practices for integrating custom payloads: 

  • Dialogflow CX doesn't use contexts to pass data to Dialogflow intentsClosed What the contact wants to communicate or accomplish like Dialogflow ES does.
  • You can pass custom data to Dialogflow CX using JSON key-value pairs. In a Snippet action in your script, create a DYNAMIC customPayload object and add the key-value pairs to it. For example: 
    DYNAMIC customPayload

    customPayload.ani = ani

    customPayload.contactID = contactId

    customPayload.masterContactId = masterId
    customPayloadJSON = "{customPayload.asJSON()}"

  • In the Exchange or Conversation action in your script, configure the customPayload property with the variable you used in the customPayload object with the asJSON() method.
  • Pass the customPayload JSON to the bot using the Payload property of QueryParameters (see Google documentation on QueryParameters for Google Dialogflow CX).
  • Data passed through QueryParameters is received by a webhook in Dialogflow CX. You can write code in the Dialogflow CX console to handle the passed data.
  • To pass custom data from your Dialogflow CX bot back to the script, use the Custom Payload field in the Dialogflow CX console for the virtual agent you're using with CXone. Map this to your script using the customPayloadVarName (out) variable in the voicebot or chatbot Studio action in your script. For example, you can use this to set the next prompt's behaviors.

Best Practices for Custom Payload with Google Dialogflow ES

When using this action with Google Dialogflow ES, follow these best practices for integrating custom payloads: 

  • CustomPayload is used to pass context for an intentClosed What the contact wants to communicate or accomplish. Context helps the bot understand the user's intent. Contexts aren't required, but they help the bot match an utteranceClosed What a contact says or types. to an intent.
  • In a Snippet action in your script, create a DYNAMIC customPayload object that follows the format outlined in the Google Dialogflow ES documentationGoogle Dialogflow CXdocumentation for REST Resource: projects.agent.sessions.context. The Studio online help provides additional information about dynamic data variables and objects.
  • You can also pass custom data with customPayload without contexts. To do this, include standard JSON key-value pairs to a DYNAMIC object.
  • The customPayload dynamic object is passed as a bot parameter as JSON, as shown in the example script.

Example Script Using VoiceBot Conversation

An example of a script using the Voicebot Conversation action.

Download this script.

Example Script for CustomPayload with Google Dialogflow ES

This script is an example of how to integrate custom payloads with Google Dialogflow ES bots. This script uses the VoicebotExchange action, but the process of integrating custom payload is the same.

Download this script.